package com.itlong.cloud.user.app;

import com.itlong.cloud.enumerate.oldapp.Message;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *     旧版APP的服务版块接口暴露
 * </desc>
 * Created 2017/9/21.
 */
@FeignClient(name = "user-service")
public interface IAppOldServeServiceClient {

    /**
     * <desc>
     *     旧版APP_获取服务版块的广告
     * </desc>
     * @param type
     * @param phoneNo
     * @param projectId
     * @return
     * @throws Exception
     * @author cuiduanwu
     * @createDate 2017/11/13
     */
    @RequestMapping(path = "/lifeservice/ads",method = RequestMethod.POST)
    Message getAd(@RequestParam("phoneNo") String phoneNo,@RequestParam("projectId") String projectId,@RequestParam("type") String type) throws Exception;


    /**
     * <desc>
     *     旧版APP_用户报修或投诉
     * </desc>
     * @param phoneNo
     * @param imageStr
     * @param imageType
     * @param propertyInfo
     * @param projectId
     * @param type 3-报修，4-投诉
     * @return
     * @throws Exception
     * @author cuiduanwu
     * @createDate 2017/11/14
     */
    @RequestMapping(path = "/app/property/reportRepair",method = RequestMethod.POST)
    Message addReportRepairOrComplaint(@RequestParam("phoneNo") String phoneNo,@RequestParam("imageStr") String imageStr,
         @RequestParam("imageType") String imageType,@RequestParam("propertyInfo") String propertyInfo,@RequestParam("projectId") String projectId,@RequestParam("type") String type) throws Exception;

    /**
     * <desc>
     *     旧版APP_检测APP版本
     * </desc>
     * @param type android/ios/iossdk/androidsdk
     * @param sort test/official
     * @return
     * @author cuiduanwu
     * @createDate 2017/11/14
     */
    @RequestMapping(path = "/app/version/latest",method = RequestMethod.POST)
    Message getLatestApp(@RequestParam("type") String type,@RequestParam("sort") String sort);


}
